﻿using System;
using System.Windows.Forms;

namespace Borg.Framework
{
    public class UnplugLinkLabel : LinkLabel
    {
        private PlugControl _ctl;

        public void Attach(SlotInfo slot, QualifyDelegate qualify)
        {
            _ctl = new PlugControl(this, new UnplugAction(slot, qualify));
        }

        public void Attach(SlotInfo slot, string param, object value)
        {
            _ctl = new PlugControl(this, new UnplugAction(slot, param, value));
        }

        protected override void OnClick(EventArgs e)
        {
            base.OnClick(e);
            _ctl.OnClick(e);
        }
    }
}

